﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HistoryWorkLoad.aspx.cs" Inherits="Basic4Net.OAWeb.Module_Workload.HistoryWorkLoad" %>

<%@ Register Assembly="Controls" Namespace="Basic4Net.Controls" TagPrefix="webdiyer" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <link type="text/css" rel="stylesheet" href="../App_Themes/ui-lightness/main.css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="../Scripts/Common.js"></script>   
       <script>
            
           //---------------------------------------------------------------------------------其他 


           //选中行高亮
           function SetHightLight(obj) {
               if (obj != null)
                   obj.style.backgroundColor = "#fffccf";

               var table = document.getElementById('table');
               for (var i = 0; i < table.rows.length; i++) {
                   var row = table.rows[i];
                   if (row != null && row.rowIndex != obj.rowIndex) {
                       row.style.backgroundColor = "#ffffff";
                   }
               }
           }


           function FilterCount() {
               var value = event.srcElement.value;
               var table = document.getElementById('table');
               var rowIndex = event.srcElement.parentElement.parentElement.rowIndex;
               var row = table.rows[rowIndex];
               if (value == 1) {
                   row.cells[2].all[0].style.display = "none";
                   //    row.cells[3].all[0].style.display = "none"; 
               }
               else {
                   row.cells[2].all[0].style.display = "block";
                   //    row.cells[3].all[0].style.display  = "block"; 
               }
           } 

           function Bind() {
               var teachCode = document.getElementById('txtTeachCode').value;
               document.getElementById('TeachCode').value = teachCode;

               var year = document.getElementById('dropYear').value;
               document.getElementById("txtYear").value = year;


               var year = document.getElementById('dropMonth').value;
               document.getElementById("txtMonth").value = year;

               document.getElementById('btnItemBind').click();
           }
    </script>
</head>
<body  onload="myload();">
   <form id="form1" runat="server">
   <div style="overflow-y: auto; overflow-x: none; height: 98%;">
            <div class="mainWarp">
                <div class="pageBody" style="height: 96%;">
                    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                    </asp:ScriptManager>  
                        
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <ul class="butList">
                            <li>
                                <asp:DropDownList ID="dropYear" runat="server" >
                                    <asp:ListItem Value="2010">2010年</asp:ListItem>
                                    <asp:ListItem Value="2009">2009年</asp:ListItem>
                                    <asp:ListItem Value="2008">2008年</asp:ListItem>
                                </asp:DropDownList>
                            </li>
                            <li>
                                <asp:DropDownList ID="dropMonth" runat="server" > 
                                    <asp:ListItem Value="1">一月</asp:ListItem>
                                    <asp:ListItem Value="2">二月</asp:ListItem>
                                    <asp:ListItem Value="3">三月</asp:ListItem>
                                    <asp:ListItem Value="4">四月</asp:ListItem>
                                    <asp:ListItem Value="5">五月</asp:ListItem>
                                    <asp:ListItem Value="6">六月</asp:ListItem>
                                    <asp:ListItem Value="7">七月</asp:ListItem>
                                    <asp:ListItem Value="8">八月</asp:ListItem>
                                    <asp:ListItem Value="9">九月</asp:ListItem>
                                    <asp:ListItem Value="10">十月</asp:ListItem>
                                    <asp:ListItem Value="11">十一月</asp:ListItem>
                                    <asp:ListItem Value="12">十二月</asp:ListItem>
                                </asp:DropDownList>
                            </li>
                            <li>
                                <asp:DropDownList ID="dropList1" runat="server"   AutoPostBack="True">
                                </asp:DropDownList> 
                            </li> 
                             <li>
                                输入姓名或工号：<input id="txtTeachCode" type="text" /><%--姓名:<input id="txtTeachName" type="text" />--%>
                             </li>
                            <li>
                                <input type="button" value="查询" class="commonBut" id="btnAddItem" onclick="Bind();" />
                            </li> 
                        </ul>  
                                
                        <div style="overflow-y: auto; overflow-x: none; height: 90%;">
                            <table id="table" class="useList" style="width: 95%">
                             <asp:Repeater ID="Repeater1" runat="server">    
                             <HeaderTemplate>
                                <tr >
                                    <th style="text-align: left; padding-left: 5px;width: 10%">
                                        职称</th>
                                    <th style="text-align: left; padding-left: 5px;width: 10%">
                                        工号</th> 
                                    <th style="text-align: left; padding-left: 5px;width: 10%">
                                        姓名</th>
                                    <th style="text-align: left; padding-left: 5px;">
                                        性别</th>
                                   <th style="text-align: left; padding-left: 5px;width: 20%">
                                        出生日期</th>
                                    <%# GetHeadInfo() %>
                                </tr>
                            </HeaderTemplate>
                            <ItemTemplate> 
                                <tr itemid="<%# Eval("TeacherID")%>"  
                                                    onclick="SetHightLight(this);" >
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("PostName")%></td>
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("TeachCode")%></td>
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("TeachName")%></td>
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("Sexy")%></td>
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("BirthDay")%></td>
                                    <%# GetTdInfo((int)Eval("TeacherID"))%>
                                     </tr> 
                            </ItemTemplate>
                            </asp:Repeater> 
                        </table> 
                        </div>  
                     <div style=" text-align:left; padding-top:8px;">
                            <webdiyer:BNPager ID="aspNetPager" runat="server" PageSize="15" Width=680
                             OnPageChanged="AspNetPagerPageChanged"    ShowPageIndex="true">
                            </webdiyer:BNPager>
                         </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnItemBind" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="aspNetPager" EventName="PageChanged" />
                </Triggers>
            </asp:UpdatePanel>

            <%--服务器端控件层--%>
            <div style="display:none;">
                <asp:Button runat="server" ID="btnItemBind" onclick="btnItemBind_Click"   />
                <asp:TextBox runat="server" ID="TeachName" />
                <asp:TextBox runat="server" ID="TeachCode" /> 
                <asp:TextBox runat="server" ID="txtYear" /> 
                <asp:TextBox runat="server" ID="txtMonth" /> 
            </div>
                  
               
            </div>
        </form>
    
</body>
</html>
<script type="text/javascript">
    function myload() {
        Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(EndRequestHandler);
    }
    function EndRequestHandler() {
        $("input[type='submit']").addClass("commonBut");
    }

    $("input[type='submit']").addClass("commonBut");
</script>